|
POST
|
Eric, Sorry this is not documented well so I could not find the doc for you to use. Will work with the team to get this documented. But you will need to follows the example I have sent you. Only what I have included in my example is needed. Before you do anything, pl. send me the full url (strip the token) and the json used. The json you have used in your last message is not correct. >Also, how am I defining what the 2nd layer is? As in, a pointer to the name of the 2nd layer (table) so it knows which >table is related? I do not see any such reference in your sample. All what you really need to figure out is the followings: - Origin layer Id - Destination layer id - Primary key in the origin layer (field name that acts as a primary key) - Foreign key in the destination layer. You just need to replace these in the example json I sent you. I have added some comments below. https://url/ArcGIS/rest/admin/services/<serviceName>/FeatureServer/addToDefinition { "layers" : [ { "id" : 0, "relationships" : [ { "id" : 1, "name" : "myRel", // <name> for your relationshp. Any name is accepted "relatedTableId" : 1, // (table or related layer Id) "cardinality" : "esriRelCardinalityOneToMany", "role" : "esriRelRoleOrigin", "keyField" : "<PrimaryKey>", // Origin primary key like GlobalId if the relationship based on globalId "composite" : <true | false> // Not sure if you need composite but set it to false if you do not need it } ] }, { "id" : 1, "relationships" : [ { "id" : 1, "name" : "myRel", // use the same name you defined above for the relationship name. "relatedTableId" : 0, // This is the layerId of the origin "cardinality" : "esriRelCardinalityOneToMany", "role" : "esriRelRoleDestination", "keyField" : "<ForignKey>", "composite" : <true | false> // // Not sure if you need composite but set it to false if you do not need it } ] } ] }
... View more
01-09-2019
01:20 PM
|
6
|
6
|
60261
|
|
POST
|
Can you send me the url you are using the also the json used. I will check and let you know.
... View more
01-09-2019
11:39 AM
|
0
|
9
|
12496
|
|
POST
|
Eric, This is a feature service addToDefinition admin API and this is why you can and need to add the layers array. Pl. use: https://url/ArcGIS/rest/admin/services/<serviceName>/FeatureServer/addToDefinition and pass similar json to the one I have added in my response and let me know if it does not work for you. Pl. note it is /FeatureServer/addToDefinition so it is not a layer admin call. Thanks Khaled
... View more
01-09-2019
11:20 AM
|
0
|
0
|
47772
|
|
POST
|
Eric, This is not a relationship item and it is not related to the portal API. As you have noticed it is related to the layer relationships and can only be set using the feature servivce admin API. I will check check and see the documentation about this. The above example model one-many relationship between layers. You can define the relationship as a composite or not. In a composite relationship, the destination row will be deleted if you delete the origin feature/row. I might be able to walk you through this if you have any issues. Khaled Hassen
... View more
01-08-2019
02:03 PM
|
0
|
0
|
9735
|
|
POST
|
Sorry I have a typo in the url for addToDefinition. It should be the feature service (not the layer) addToDefinition https://url/ArcGIS/rest/admin/services/<serviceName>/FeatureServer/addToDefinition Khaled Hassen
... View more
01-08-2019
01:56 PM
|
2
|
11
|
47773
|
|
POST
|
We do support add relationship to existing feature service in online using feature service addToDefinition API. Ex: https://url/ArcGIS/rest/admin/services/<serviceName>/FeatureServer/0/addToDefinition The origin layer and its related layer (table) has to exist. This API can only allow you to create a relationship between the two layers and be able to use queryRelated API on the layer. In the Example below, you will need to define the relationship for each layer which reference that other layer. Pl. note, the relationshipId for both layer is the same. FYI we also support creating a view that joins both layers. Pl. let us know if you your workflow needs a view that has one layer that join both origin and destination layer. Hope that helps. Khaled { "layers" : [ { "id" : 0, "relationships" : [ { "id" : 1, "name" : "myRel", "relatedTableId" : 1, "cardinality" : "esriRelCardinalityOneToMany", "role" : "esriRelRoleOrigin", "keyField" : "<PrimaryKey>", "composite" : <true | false> } ] }, { "id" : 1, "relationships" : [ { "id" : 1, "name" : "myRel", "relatedTableId" : 0, "cardinality" : "esriRelCardinalityOneToMany", "role" : "esriRelRoleDestination", "keyField" : "<ForignKey>", "composite" : <true | false> } ] } ] }
... View more
01-08-2019
01:46 PM
|
5
|
3
|
47772
|
|
POST
|
Not currently supported in the server side. This would need to be done on the client side. However, you can create a view of the feature service / layer with restrictive access like viewing attachments only through feature service capabilities. You can allow editing of the attachments only in the source feature service.
... View more
01-08-2019
07:45 AM
|
1
|
0
|
925
|
|
POST
|
Do you know if you have any definitionExpression on the layer that reference the "Type" field? deleting a field that is referenced by the definition expression would cause issue like what you are seeing. Also do you know if updating a feature works? I have just tried deleting a field and I have no issue adding features. So it might be either related to the definitionExpression or server cache issue. Updating anything in the layer would clear the cache if it is cache issue. Also would be good to know how you deleted the field? did you use the UX or from the REST admin API? You can always delete a field using the layer admin API: rest/admin/services/<myService>/FeatureServer/<layerId>/deleteFromDefinition { "fields" : [ { "name" : "<fieldName" } ] } Thanks Khaled Hassen Online Feature Service Dev Lead
... View more
01-08-2019
07:39 AM
|
0
|
0
|
3644
|
|
POST
|
FYI: Currently you can change the followings field properties after it is published: - Domain - Alias - Visibility The way to change this properties through layer update definition API. /rest/admin/.../FeatureServer/<layerId>/updateDefinition { "fields" : [ { "name" : "myField", "alias" : <myalias>, "domain" : "...", "visible" : <true/false> } ] } We are currently working on allowing updating other properties including nullable, editable in the next release or so. Will be update you shortly if we can make it in March release of online. Until we support this. You can always create an empty service and add a new empty layer with the new definition you need. You can then use the layer Append API to append the existing data you have (you would need to export the existing data to a filegdb or any other other format). Khaled
... View more
01-02-2019
09:12 AM
|
2
|
0
|
1161
|
|
DOC
|
FYI: feature service API supports Append API on the layer. This is supported in the online home APP UX as well. The API supports feature upsert where you can update existing features (using a unique field) and add new features if they do not exists. We do support most of ArcGIS data format including filegdb, shapefile, geojson, excel, csv, etc. Will be good to check it out. https://developers.arcgis.com/rest/services-reference/append-feature-service-.htm Thanks Khaled
... View more
12-31-2018
09:42 AM
|
0
|
0
|
12142
|
|
BLOG
|
Yes looks like a bug. Will check it out. Until this is fixed, Pl. do any data or metadata update and this should clear the cache. Fix will be in online shortly. Khaled
... View more
12-31-2018
08:16 AM
|
0
|
0
|
390
|
|
POST
|
FYI: the feature service layer Calculate API allows passing a where clause to filter which records will be affected by calculate. So without having a filter on the layer, you can pass a ad-hoc where clause to the calculate API. If you want to apply calculate to only null field, you can use something like myField IS NULL. Khaled
... View more
12-31-2018
08:05 AM
|
1
|
0
|
3389
|
|
POST
|
Great thanks. We will add the subtypes in future release of online as I described earlier. We will handle it when publishing new data, but we will offer you a way to edit existing service layer to add subtypes. I am assuming the APP continue to work without subtypes when migrating from enterprise to online. FYI: we do have many supports properties in the layer and service metadata to indicate what is supported or not (we do not really have on for subtypes - will add it). There will always be differences between feature services in general and will be good to check these supports properties.
... View more
12-07-2018
09:13 AM
|
0
|
6
|
1742
|
|
POST
|
Pl. describe what is not working for you for the enterprise and we will be sure it will make it in the next release or so in online. We are am not really aware of functionality missing in the API regarding subtypes except supporting it outside the renderer (only Pro uses it). As far as the subtypes and how to scale it, it is also an issue with enterprise also since the subtypes are returned in the layer metadata which as you described might not scale if we have many subtypes. Supporting subtypes is work in progress currently in online and we will offer a salable solution shortly.
... View more
12-07-2018
08:22 AM
|
0
|
0
|
1742
|
|
POST
|
>What I am saying that as someone who makes their livelihood using the APIs it is not unreasonable to expect that both >agol and the current ArcGIS Server would follow the same standard of service definition. Yes this is our goal and we are trying hard to make this happens. But as you might have seen, there are always new WebGIS development in online FS that is not yet in server/enterprise and vise versa. This is mainly related to the the different requirements we have for enterprise versus online and their release plan. As far as the sub types, we do support it online it as described and used. We are working on adding the support of adding subtypes during publishing and expose them even if they are no referenced by any renderer. This is the only missing spec in online FS but our understanding this functionality is used only by Pro. So this is why it was not a high priority in development for online FS. To get around this limitation you can use the feature service layer update admin API to update the layer types or templates. If this is not the issue, pl. let us know and we can help you providing a workaround for any missing specs if possible and add the missing functionality to online in future releases Thanks Khaled
... View more
12-07-2018
07:42 AM
|
0
|
1
|
3110
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-01-2019 08:31 AM | |
| 1 | 01-10-2019 04:25 PM | |
| 1 | 11-20-2025 03:21 PM | |
| 1 | 10-31-2023 07:04 AM | |
| 1 | 04-13-2023 08:40 AM |
| Online Status |
Offline
|
| Date Last Visited |
03-30-2026
06:34 AM
|