-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtmp
More file actions
1 lines (1 loc) · 16 KB
/
Copy pathtmp
File metadata and controls
1 lines (1 loc) · 16 KB
1
{"openapi":"3.0.1","info":{"title":"Partner Integrations API","description":"Application Programming Interface for the Partner Integrations Service."},"servers":[{"url":"https://parint.nonprod.vibe.justworks.com","description":"Generated server url"}],"tags":[{"name":"2. Echo Ingestion Api Controller","description":"Ingest data into Echo on behalf of an external integration partner."},{"name":"1. Integrations API Controller","description":"Create and manage instances of integration solutions."},{"name":"Ω. Temporary API Controller (!CAUTION!)","description":"Temporary and untested endpoints for the purpose of debugging ongoing feature work. \n\n If you need similar functionality in the long term please create a jira ticket to add fully tested dev endpoints for your use case."}],"paths":{"/integrations/v1/instances":{"get":{"tags":["1. Integrations API Controller"],"summary":"List instances belonging to an owner.","description":"List all of the integration instances belonging to the provided owner, optionally filtered by the provided solution or partner id.","operationId":"listInstances","parameters":[{"name":"ownerId","in":"query","description":"The identifier of the owning entity - return integration instances belonging to this owner id.","required":true,"schema":{"type":"string"},"example":"example_owner_id"},{"name":"solutionUuid","in":"query","description":"The uuid of the solution to scope the response to (optional).","required":false,"schema":{"type":"string"},"example":"5d4d174d-fac8-41b7-953f-08d3bd5a03b5"},{"name":"partnerUuid","in":"query","description":"The uuid of the partner to scope the response to (optional).","required":false,"schema":{"type":"string"},"example":"b6f84d88-d230-4c09-a17a-07fa1af2d84d"}],"responses":{"200":{"description":"List of integration instances owned by the provided owner, optionally filtered by the provided solution or partner id.","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InstanceResponse"}}}}},"404":{"description":"The provided owner id was not found."}},"security":[{"service-token":[]}]},"post":{"tags":["1. Integrations API Controller"],"summary":"Creates an integration instance.","description":"Create an integration instance of the provided solution belonging to the provided owner.","operationId":"createClient","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInstanceRequest"}}},"required":true},"responses":{"404":{"description":"The requested solution was not found."},"200":{"description":"Successfully created an integration instance. Returns the instance and any temporary values generated as part of the setup process.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInstanceResponse"}}}},"409":{"description":"No more instances can be created for this solution with this owner."}},"security":[{"service-token":[]}]}},"/integrations/v1/ingest":{"post":{"tags":["2. Echo Ingestion Api Controller"],"summary":"Post a message to Echo.","description":"Takes a stringified payload and submits it to Kafka. Requires a Partner Token with the scope external_partner.ingest_data, as well as a valid Instance Key.","operationId":"postToEcho","parameters":[{"name":"justworks-instance-key","in":"header","description":"the instance key which belongs to the instance to delete.","required":true,"schema":{"type":"string"},"example":"example_instance_key_header_value"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EchoIngestRequest"}}},"required":true},"responses":{"200":{"description":"Successfully submitted a message to Echo.","content":{"*/*":{"schema":{"type":"string"}}}}},"security":[{"partner-token":[]},{"instance-key":[]}]}},"/integrations/v1/instances/{instanceUuid}":{"get":{"tags":["1. Integrations API Controller"],"summary":"Get an integration instance.","description":"Fetch the details of the instance corresponding to the provided instanceUuid.","operationId":"getInstance","parameters":[{"name":"instanceUuid","in":"path","description":"The uuid of the instance to fetch.","required":true,"schema":{"type":"string"},"example":"example_instance_uuid"}],"responses":{"404":{"description":"The requested instance was not found."},"200":{"description":"Successfully returned instance details.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/InstanceResponse"}}}}},"security":[{"service-token":[]}]},"delete":{"tags":["1. Integrations API Controller"],"summary":"Delete the specified instance.","description":"Delete the integration instance identified by the provided uuid.","operationId":"deleteClient","parameters":[{"name":"instanceUuid","in":"path","description":"The uuid of the instance to delete.","required":true,"schema":{"type":"string"},"example":"example_instance_uuid"},{"name":"userUuid","in":"query","description":"The user performing the delete action.","required":true,"schema":{"type":"string"},"example":"123e4567-e89b-12d3-a456-426614174000"}],"responses":{"200":{"description":"Successfully deleted the instance identified by the provided uuid."}},"security":[{"service-token":[]}]},"patch":{"tags":["1. Integrations API Controller"],"summary":"Update an instance","description":"Updates fields on an instance - note that not all fields are updatable.","operationId":"updateInstance","parameters":[{"name":"instanceUuid","in":"path","description":"The instance uuid to be updated.","required":true,"schema":{"type":"string"},"example":"123e4567-e89b-12d3-a456-426614174000"},{"name":"userUuid","in":"query","description":"The user performing the update action.","required":true,"schema":{"type":"string"},"example":"123e4567-e89b-12d3-a456-426614174000"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInstanceRequest"}}},"required":true},"responses":{"200":{"description":"Successfully updated the requested fields.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/InstanceResponse"}}}},"404":{"description":"The requested instance was not found."},"422":{"description":"Operation not supported.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/InstanceResponse"}}}}},"security":[{"service-token":[]}]}},"/temp/tray/wizard/{trayUserId}":{"get":{"tags":["Ω. Temporary API Controller (!CAUTION!)"],"operationId":"createWizardAuthCode","parameters":[{"name":"trayUserId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/temp/tray/users/{ownerId}":{"get":{"tags":["Ω. Temporary API Controller (!CAUTION!)"],"operationId":"getUserIdByExternalId","parameters":[{"name":"ownerId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/temp/tray/users/create/{ownerId}":{"get":{"tags":["Ω. Temporary API Controller (!CAUTION!)"],"operationId":"createUser","parameters":[{"name":"ownerId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/temp/tray/token/{trayUserId}":{"get":{"tags":["Ω. Temporary API Controller (!CAUTION!)"],"operationId":"getUserToken","parameters":[{"name":"trayUserId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/temp/tray/solution/create/{solutionId}/{userToken}":{"get":{"tags":["Ω. Temporary API Controller (!CAUTION!)"],"operationId":"createSolutionInstance","parameters":[{"name":"solutionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"userToken","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/integrations/v1/solutions":{"get":{"tags":["1. Integrations API Controller"],"summary":"List all of the solutions available to this owner.","description":"List all of the solutions that are currently enable for use by the provided owner id.","operationId":"listSolutions","parameters":[{"name":"ownerId","in":"query","description":"The id of the owning entity.","required":true,"schema":{"type":"string"},"example":"example_owner_id"}],"responses":{"200":{"description":"Successfully listed available solutions for the provided owner.","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SolutionResponse"}}}}}},"security":[{"service-token":[]}]}},"/integrations/v1/instances/current":{"get":{"tags":["1. Integrations API Controller"],"summary":"Get an integration instance.","description":"Fetch the details of the instance corresponding to the provided instanceUuid.","operationId":"getInstanceCurrent","parameters":[{"name":"justworks-instance-key","in":"header","description":"The instance key which belongs to the instance to fetch.","required":true,"schema":{"type":"string"},"example":"example_instance_key_header_value"}],"responses":{"404":{"description":"The requested instance was not found."},"200":{"description":"Successfully returned instance details.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/InstanceResponse"}}}}},"security":[{"service-token":[]}]},"delete":{"tags":["1. Integrations API Controller"],"summary":"Delete the 'current' instance.","description":"Delete the integration instance corresponding to the instance key provided. Requires external_partner.delete_integration scope","operationId":"deleteClientCurrent","parameters":[{"name":"justworks-instance-key","in":"header","description":"the instance key which belongs to the instance to delete.","required":true,"schema":{"type":"string"},"example":"example_instance_key_header_value"}],"responses":{"200":{"description":"Successfully deleted the instance associated with the provided instance key."}},"security":[{"partner-token":[]},{"instance-key":[]}]}}},"components":{"schemas":{"CreateInstanceRequest":{"required":["ownerId","ownerName","solutionUuid","userUuid"],"type":"object","properties":{"ownerId":{"type":"string","description":"The id of the owning entity whose data is being exposed to the partner.","example":"example_owner_id"},"solutionUuid":{"type":"string","description":"The uuid of the integration solution to create an instance of.","example":"5d4d174d-fac8-41b7-953f-08d3bd5a03b5"},"userUuid":{"type":"string","description":"The uuid of the user requesting the instance creation, for auditing purposes only.","example":"123e4567-e89b-12d3-a456-426614174000"},"ownerName":{"type":"string","description":"The name of the owning entity whose data is being exposed to the partner (optional).","example":"Owner Inc."}}},"CreateInstanceResponse":{"type":"object","properties":{"instance":{"$ref":"#/components/schemas/InstanceResponse"},"transientValues":{"$ref":"#/components/schemas/JsonObject"}}},"InstanceResponse":{"type":"object","properties":{"uuid":{"type":"string","description":"The uuid of the instance.","example":"123e4567-e89b-12d3-a456-426614174000"},"solutionUuid":{"type":"string","description":"The uuid of the solution which this is an instance of.","example":"123e4567-e89b-12d3-a456-426614174000"},"solutionSlug":{"type":"string","description":"The slug of the solution which this is an instance of.","example":"some-slug"},"status":{"type":"string","description":"The status of the instance, is it enabled or disabled.","example":"disabled"},"state":{"type":"string","description":"The current state of the instance. Is it fully ACTIVE or is it just INITIALIZED","example":"ACTIVE"},"ownerId":{"type":"string","description":"The uuid of the owning entity whose data this instance exposes.","example":"example_owner_id"},"instanceKey":{"type":"string","description":"The integration instance key representing access granted on behalf of the owner to the partner for this solution.","example":"1234abcd"},"createdBy":{"type":"string","description":"The uuid of the user who initiated the creation of this instance.","example":"123e4567-e89b-12d3-a456-426614174000"},"createdDate":{"type":"string","description":"The timestamp of the initial creation of this instance (ISO-8601).","example":"2023-04-17T19:09:16.621777Z"},"updatedBy":{"type":"string","description":"The uuid of the user who last updated this instance.","example":"123e4567-e89b-12d3-a456-426614174000"},"updatedDate":{"type":"string","description":"The timestamp of the last update to this instance (ISO-8601).","example":"2023-04-17T19:09:16.621777Z"},"lastUsedDate":{"type":"string","description":"The timestamp of the last time this instance was successfully used (ISO-8601).","example":"2023-04-17T19:09:16.621777Z"},"document":{"required":["empty","entries","keys","size","values"],"type":"object","properties":{"content":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonElement"},"writeOnly":true},"values":{"type":"array","items":{"$ref":"#/components/schemas/JsonElement"}},"empty":{"type":"boolean"},"size":{"type":"integer","format":"int32"},"entries":{"uniqueItems":true,"type":"array","items":{"type":"object","properties":{"value":{"$ref":"#/components/schemas/JsonElement"},"key":{"type":"string"}}}},"keys":{"uniqueItems":true,"type":"array","items":{"type":"string"}}},"additionalProperties":{"$ref":"#/components/schemas/JsonElement"},"description":"Additional key-value data.","example":{"domain":{"key":"value"}}}},"description":"The newly created integration instance."},"JsonElement":{"type":"object","description":"Additional key-value data."},"JsonObject":{"required":["empty","entries","keys","size","values"],"type":"object","properties":{"content":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonElement"},"writeOnly":true},"values":{"type":"array","items":{"$ref":"#/components/schemas/JsonElement"}},"empty":{"type":"boolean"},"size":{"type":"integer","format":"int32"},"entries":{"uniqueItems":true,"type":"array","items":{"type":"object","properties":{"value":{"$ref":"#/components/schemas/JsonElement"},"key":{"type":"string"}}}},"keys":{"uniqueItems":true,"type":"array","items":{"type":"string"}}},"additionalProperties":{"$ref":"#/components/schemas/JsonElement"},"description":"Additional key-value data.","example":{"domain":{"key":"value"}}},"EchoIngestRequest":{"required":["key","payload","topic"],"type":"object","properties":{"topic":{"type":"string","description":"The topic that the message will be posted to","example":"example_topic"},"key":{"type":"string","description":"The key that the message will be posted with","example":"example_key"},"payload":{"type":"string","description":"The message payload, stringified","example":"{\"field\":\"value\"}"}}},"UpdateInstanceRequest":{"type":"object","properties":{"state":{"type":"string","description":"The new value for state of the instance. Only ACTIVE is currently supported.","example":"ACTIVE"}},"description":"The request body with fields to update."},"PartnerResponse":{"type":"object","properties":{"uuid":{"type":"string","description":"The uuid of the partner.","example":"123e4567-e89b-12d3-a456-426614174000"},"name":{"type":"string","description":"The name of the partner.","example":"PartnerCorp"}},"description":"The partner that owns this solution.","example":{"uuid":"123e4567-e89b-12d3-a456-426614174000","name":"Partner Corp Inc LLC"}},"SolutionResponse":{"type":"object","properties":{"uuid":{"type":"string","description":"The uuid of the solution.","example":"123e4567-e89b-12d3-a456-426614174000"},"partner":{"$ref":"#/components/schemas/PartnerResponse"},"status":{"type":"string","description":"The status of the solution","example":"ENABLED"},"slug":{"type":"string","description":"The slug of the solution","example":"partnercorp_solution"},"title":{"type":"string","description":"The name of the solution.","example":"PartnerCorp Basic Integration Solution"}}}},"securitySchemes":{"instance-key":{"type":"apiKey","name":"justworks-instance-key","in":"header"},"partner-token":{"type":"apiKey","description":"Raw authorization header- WARNING you must include the 'Bearer' prefix","name":"Authorization","in":"header"},"service-token":{"type":"apiKey","description":"Raw authorization header- WARNING you must include the 'Bearer' prefix","name":"Authorization","in":"header"}}}}