{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"How to access DrillPlan APIs","description":"Accelerate E&P application development and protect your innovation by consuming our Data and Domain APIs / Platform APIs.","lang":"en-US","meta":[{"name":"robots","content":"noindex"}],"llmstxt":{"hide":true,"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#how-to-access-drillplan-apis"},"children":["How to access DrillPlan APIs"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#create-an-app"},"children":["Create an App"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#create-a-client"},"children":["Create a Client"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#generate-a-token"},"children":["Generate a Token"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#audience"},"children":["Audience"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#authorization-code-flow"},"children":["Authorization Code Flow"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#acf-sequence-diagram"},"children":["ACF Sequence Diagram"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#example-expressjs-app-to-retrieve-a-token"},"children":["Example express.js app to retrieve a token"]}]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#client-credentials"},"children":["Client Credentials"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#delfi-configuration"},"children":["DELFI Configuration"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#curl-example"},"children":["CURL Example"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#slb-data-partition-id"},"children":["SLB Data Partition ID"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#mandatory-request-headers"},"children":["Mandatory Request Headers"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"how-to-access-drillplan-apis","__idx":0},"children":["How to access DrillPlan APIs"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This tutorial outlines the basic prerequisites that you need to have in order to use the DrillPlan APIs, found in the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/drillplan/apis/drillplan-aea-api"},"children":["DrillPlan API Catalog"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"create-an-app","__idx":1},"children":["Create an App"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In order to use any DELFI APIs, an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AppKey"]}," is required. An App and corresponding ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AppKey"]}," can be generated from the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["My Apps"]}," tab in the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developer.delfi.slb.com/"},"children":["Developer Portal"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Refer how to ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/team-management#create-a-team"},"children":["create a Team"]},", how to add members (./../../../../guides/cloud-apis/developer-portal/get-started-as-team-admin.md#add-members-to-a-team) to a Team, how to ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/app-management"},"children":["create an App"]}," and how to get the AppKey."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When creating your app it is important to specify all the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Services"]}," that you'd like to use. To use the DrillPlan Public APIs you should ensure that both"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["✅ DrillPlan"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["✅ SLB Authenticator"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["are selected."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"create-a-client","__idx":2},"children":["Create a Client"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Once you have created an App and enabled the necessary services, you need to create a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Client"]},". When creating a new client you will be prompted for"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Name"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Permitted Grant Types (ACF, ACF with PKCE, CCG etc)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Redirect URIs (if using ACF or ACF with PKCE)"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This will generate a"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Client_Id"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Secret"]}]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Please note that the secret will only be displayed once when initially created. It can be reset any time from the Actions menu."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"generate-a-token","__idx":3},"children":["Generate a Token"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["An ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["access_token"]}," can be generated by following one of the authentication flows described ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/sauth/tutorial/about"},"children":["here"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["While there are several possible authentication flows, the common approaches are"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Authorization Code Flow (ACF)"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["User based authentication"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Preferred approach"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Data entitlement is governed by the user issuing the request"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Client Credentials Flow (CCG)"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Also known as a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["service account"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Service accounts have full access to all DrillPlan data within the data partition"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Requires some additional configuration in DELFI, see step X below"]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"audience","__idx":4},"children":["Audience"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All JWT (JSON Web Tokens) require the following ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["audience"]}," claim to be added to access DrillPlan data"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fwk-drillplan.slbservice.com"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This can be done in the initial token request by providing as a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["scope"]}," or it can later be added by doing a secondary token exchange."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"authorization-code-flow","__idx":5},"children":["Authorization Code Flow"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Authorization code flow (or ACF with PKCE) is the preferred approach for authentication since it will honour the data entitlements of the user issuing the API call. However it does require the browser to perform some redirects to the provided URI in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client"]}," setup above."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"acf-sequence-diagram","__idx":6},"children":["ACF Sequence Diagram"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/authorization_code_flow.830ee4119f74774b4fbd1b920ab80a8fd3cbe42efcbaf80e9ce10d1ad61382e5.c0faf1fc.svg","alt":"Authorization_Code_Flow.svg"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Fig 1: Sequence diagram illustrating 'Authorization Code Flow'"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"example-expressjs-app-to-retrieve-a-token","__idx":7},"children":["Example express.js app to retrieve a token"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Assuming you have provided the following ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["redirect URI"]}," in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client"]}," setup:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["http://localhost:3000/callback"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["the following .js code can be used to retrieve a token in the browser:"]},{"$$mdtype":"Tag","name":"details","attributes":{},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":["Example node.js app code"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"js","header":{"controls":{"copy":{}}},"source":"const express = require('express');\nconst axios = require('axios');\nconst querystring = require('querystring');\n\nconst app = express();\n\nconst CLIENT_ID = 'XXXXX'; // Replace with your Client ID\nconst CLIENT_SECRET = 'XXXXX'; // Replace with your Client Secret\nconst REDIRECT_URI = 'http://localhost:3000/callback'; // Redirect URI\nconst AUTHORIZATION_URL = 'https://csi.slb.com/v2/auth'; // Replace with the provider's authorization URL\nconst TOKEN_URL = 'https://csi.slb.com/v2/token'; // Replace with the provider's token URL\nconst AUDIENCE = 'fwk-drillplan.slbservice.com'; // Specific for calls to DrillPlan\n\n// Step 1: Redirect to the SAuth authorization page\napp.get('/', (req, res) => {\n    const authQueryParams = querystring.stringify({\n        response_type: 'code',\n        client_id: CLIENT_ID,\n        redirect_uri: REDIRECT_URI,\n        scope: AUDIENCE, // Add the specific DrillPlan audience\n        state: 'random_string_to_prevent_csrf', // Optional\n    });\n\n    res.redirect(`${AUTHORIZATION_URL}?${authQueryParams}`);\n});\n\n// Step 2: Handle the redirect with the authorization code\napp.get('/callback', async (req, res) => {\n    const { code, state } = req.query;\n\n    if (!code) {\n        return res.status(400).send('Authorization code not found');\n    }\n\n    try {\n        const basicAuth = Buffer.from(`${CLIENT_ID}:${CLIENT_SECRET}`).toString('base64');\n        // Exchange the authorization code for an access token\n        const tokenResponse = await axios.post(\n            TOKEN_URL,\n            querystring.stringify({\n                grant_type: 'authorization_code',\n                code,\n                redirect_uri: REDIRECT_URI,\n            }),\n            {\n                headers: { \n                    'Content-Type': 'application/x-www-form-urlencoded',\n                    'Authorization': `Basic ${basicAuth}`,\n                },\n            }\n        );\n\n        const { access_token } = tokenResponse.data;\n\n        res.send(`DrillPlan Public API Token: ${access_token}`);\n    } catch (error) {\n        console.error(error.response?.data || error.message);\n        res.status(500).send('Error during token generation');\n    }\n});\n\n// Start the server\napp.listen(3000, () => {\n    console.log('Server running on http://localhost:3000');\n});\n","lang":"js"},"children":[]}]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Please note in order to run the above code you need to have ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://nodejs.org/en"},"children":["node.js"]}," installed and should install the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["express"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["axios"]}," dependencies e.g. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["npm install express axios"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"client-credentials","__idx":8},"children":["Client Credentials"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Client Credential Flow (CCF) (a.k.a. a service acccount) can also be used with DrillPlan, but requires some additional configuration."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"delfi-configuration","__idx":9},"children":["DELFI Configuration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In order for the generated ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["access_token"]}," to work, some additional steps in DELFI need to be taken."]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{client_id}@delfiserviceaccount.com"]}," needs to be added as a user to a department and issued with a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DrillPlan - Plus"]}," subscription (part number ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DRPL-PB-SUBU"]},"). This can be done by a Department or Account Manager in ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://delfi.slb.com/"},"children":["DELFI"]}," under the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Manage"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Users"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Bulk Import Users"]}," action."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Example CSV Table format to Add DrillPlan - Plus Subscription to a clientId"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Email Address"},"children":["Email Address"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Last Name"},"children":["Last Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"First Name"},"children":["First Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Department"},"children":["Department"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"crmContractId"},"children":["crmContractId"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Part Number"},"children":["Part Number"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Region"},"children":["Region"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["{client_id}*@delfiserviceaccount.com"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ServiceAccount*"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["AppName1*"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["MyDepartmentName*"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["MyContractID*"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["DRPL-PB-SUBU"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["EUR*"]}]}]}]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Please note that all the * values are examples and should be replaced"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The App needs to be added to the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Associated Applications"]}," list for the respective data partition. This can be done by the DELFI Account Manager in ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://delfi.slb.com/"},"children":["DELFI"]}," under ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Manage"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Data Source Registry"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Data Source"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Data Partition"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Allowed Applications"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Add New"]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"curl-example","__idx":10},"children":["CURL Example"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Once the additiona configuration has been completed, a token can be retrieved from the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://csi.slb.com/v2/token"]}," end point."]},{"$$mdtype":"Tag","name":"details","attributes":{},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":["Example CURL request to retrieve a token"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"curl","header":{"controls":{"copy":{}}},"source":"curl -X POST https://csi.slb.com/v2/token \\\n  --header 'Content-Type: application/x-www-form-urlencoded' \\\n  --header 'Authorization: Basic <base64 encoded CLIENT_ID:CLIENT_SECRET>' \\\n  --data grant_type=client_credentials \\\n  --data 'scope={client_id} fwk-drillplan.slbservice.com' \\\n  --data client_id={client_id} \\\n  --data client_secret={client_secret}\n","lang":"curl"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If successful, a response containing the final ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["access_token"]}," will be generated:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"js","header":{"controls":{"copy":{}}},"source":"{\n  \"access_token\": \"{access_token}\",\n  \"token_type\": \"Bearer\",\n  \"expires_in\": 3600\n}\n","lang":"js"},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"slb-data-partition-id","__idx":11},"children":["SLB Data Partition ID"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The SLB data partition ID is auto-generated for each data partition within the DELFI Account. It is needed in the header of each API call to DrillPlan. This can be obtained either programmatically using the the CCM API ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/ccm/apis/ccm-user-context-service"},"children":["user-context-service"]}," or manually from the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Copy Context"]}," button on the DELFI homepage. This is found by first selecting your initials in the upper right of the screen, then selecting the clipboard icon found on the right of the heading ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Selected User Context"]},"."]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Note: you may need to add the service"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["✅ CCM"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["to your APP to use the CCM endpoint."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"mandatory-request-headers","__idx":12},"children":["Mandatory Request Headers"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Once you have the following:",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["AppKey",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A valid ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["access_token"]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["And identified the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["slb-data-partition-id"]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can begin to make queries to ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/drillplan/apis/drillplan-aea-api"},"children":["DrillPlan's public API catalog"]},". For example:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"js","header":{"controls":{"copy":{}}},"source":"curl -X GET 'https://eu-api.delfi.slb.com/drillplan/plan/v1/projects/joined' \\\n--header 'accept: text/plain' \\\n--header 'slb-data-partition-id: <slb-data-partition-id>' \\\n--header 'Authorization: Bearer <access_token>' \\\n--header 'AppKey: <AppKey>'\n","lang":"js"},"children":[]}]},"headings":[{"value":"How to access DrillPlan APIs","id":"how-to-access-drillplan-apis","depth":1},{"value":"Create an App","id":"create-an-app","depth":2},{"value":"Create a Client","id":"create-a-client","depth":2},{"value":"Generate a Token","id":"generate-a-token","depth":2},{"value":"Audience","id":"audience","depth":3},{"value":"Authorization Code Flow","id":"authorization-code-flow","depth":3},{"value":"ACF Sequence Diagram","id":"acf-sequence-diagram","depth":4},{"value":"Example express.js app to retrieve a token","id":"example-expressjs-app-to-retrieve-a-token","depth":4},{"value":"Client Credentials","id":"client-credentials","depth":3},{"value":"DELFI Configuration","id":"delfi-configuration","depth":4},{"value":"CURL Example","id":"curl-example","depth":4},{"value":"SLB Data Partition ID","id":"slb-data-partition-id","depth":2},{"value":"Mandatory Request Headers","id":"mandatory-request-headers","depth":2}],"frontmatter":{"seo":{"title":"How to access DrillPlan APIs"}},"lastModified":"2025-05-21T18:35:30.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/solutions/drillplan/docs/tutorials/api-consumption-guide/api-consumption-tutorial","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}