Lets say we have 2 resources with relation such as:
- Creative
- Organization
Each creation attempt can start with:
- Creation of an Organization
- Creation of a Creative
But if user already has an Organization, can skip the creation of Organization and use that. How would I generate links for my entry point?
{
"_links": {
"self": { "href": "https://myorg.com/myapi" },
"curies": [{ "name": "myorg", "href": "https://myorg.com/docs/myapi/{rel}" }],
"myorg:organizations": { "href": "https://myorg.com/myapi/organizations" },
"myorg:creatives": { "href": "https://myorg.com/myapi/creatives" }
},
"_embedded": {}
}
This is my current entry point response.
- How can I specify two creation step as entry point?
- Should I just omit Creatives in my entry point response?
Below is my other two resource definitions:
Organizations
{
"_links": {
"self": { "href": "https://myorg.com/myapi/organizations" },
"help": { "href": "https://myorg.com/docs/myapi/organizations" },
},
"_embedded": {
"item": [{
"_links": {
"self": { "href": "https://myorg.com/myapi/organizations/12345" },
"help": { "href": "https://myorg.com/docs/myapi/organizations/12345" },
},
"_id": "12345",
"value": "E15B23FFF"
},...]
}
}
Creatives
{
"_links": {
"self": { "href": "https://myorg.com/myapi/creatives" },
"help": { "href": "https://myorg.com/docs/myapi/creatives" },
},
"_embedded": {
"item": [{
"_links": {
"self": { "href": "https://myorg.com/myapi/creatives/54321" },
"help": { "href": "https://myorg.com/docs/myapi/creatives/54321" },
},
"_embedded": {
"organization": {
"_links": {
"self": { "href": "https://myorg.com/myapi/organizations/12345" },
"help": { "href": "https://myorg.com/docs/myapi/organizations/12345" }
},
"_id": "12345",
"value": "E15B23FFF"
},
},
"_id": "54321",
"status": "processing"
}, ...]
}
}