|
POST
|
Is this happening also when the service is also public? private services are not using the CDN cache and we wonder if it is a availability issue.
... View more
01-10-2019
08:07 AM
|
0
|
1
|
3038
|
|
POST
|
Here are the steps you need to copy the layer from one service to another; i.e., from service1 to service2 1. Create an empty layer (table you need) using service addToDefinition admin API. This will add an empy table or layer to the feature service. You will need to copy the list of fields from the source layer (service1) into the definition below which will live in service2. help url: Add to Definition (Feature Service)—ArcGIS REST API: Services Directory | ArcGIS for Developers https://url/ArcGIS/rest/admin/services/<service2>/FeatureServer/addToDefinition Json to use will look like: { "layers" : [ { "name" : "mylayername", "type" : "Table", // you can also make a feature layer by using Feature "Feature Layer" instead of "Table "fields" : [ { name" : "myFieldName", // copy the rest from the original layer } , ... ] } ] } 2. Export the layer from service one into a filegdb. 3. use Update data from the online UX to append the filegdb into the empty layer you created earlier. By completing 1,2,3 then you have move the table from service 1 to service 2. Then you will be able to add the relationship as we talked earlier. Hope that helps. Khaled
... View more
01-09-2019
04:27 PM
|
3
|
2
|
6444
|
|
POST
|
Are you trying to add relationship between two services layer? This is not supported. Relationships can be added only between two layers that belong to the same service. As you know, within each service, the layerId is unique. If this is what you are trying to do then you might need to use query layer or view layer. Let me know if this is the case. Khaled
... View more
01-09-2019
02:26 PM
|
0
|
1
|
13135
|
|
POST
|
In feature services, client normally use queryRelated API to find out related rows to an origin or vise versa. Another use case is to define composite relationship between origin layer and its destination layer. Deleting an origin row would delete the related row and if it is not composite the feature service would set null or remove the related rows by setting null in the foreign key. In the top of all these, editing is the main requirement to use relationships. All other solutions in arcgis are read only join. We do offer similar functionality (similar to insight) build in the feature service to do join and combine the two layers into one join layer. If the join layer is what the client needs, it will be good to continue and model it inside the feature service rather than external services like insight since all clients can use the REST API on the feature service join layer as any other non-join layer.
... View more
01-09-2019
01:56 PM
|
0
|
0
|
6445
|
|
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
|
62507
|
|
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
|
13136
|
|
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
|
49378
|
|
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
|
10260
|
|
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
|
49379
|
|
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
|
49378
|
|
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
|
1049
|
|
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
|
4123
|
|
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
|
1369
|
|
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
|
13896
|
|
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
|
466
|
| Title | Kudos | Posted |
|---|---|---|
| 5 | 07-01-2026 04:05 PM | |
| 2 | 07-01-2026 08:31 AM | |
| 1 | 02-01-2019 08:31 AM | |
| 1 | 01-10-2019 04:25 PM | |
| 1 | 11-20-2025 03:21 PM |
| Online Status |
Offline
|
| Date Last Visited |
Monday
|